let arr = [1,2,{n:3}]
// let arr2 =[3,4]

// let arr3 = arr.concat(arr2)
// console.log(arr3);
let newArr = arr.slice()      //[...arr]          //[].concat(arr)
//数组切割 splice(start,end)会改变原数组    slice(start,end)不会改变原数组


arr[2].n = 30

console.log(newArr);


